str_a = "hello"
str_b = "world"


# 增加
result_create = str_a + str_b
str_a += str_b


# 检索
str_a.find("h")
str_a.find("z")
str_a.find("h")
str_a.find("z")

str_a.startswith("h")
str_a.startswith("z")
str_a.endswith("o")
str_a.endswith("z")

result_index = str_a[1:2]

# 更新
result_replace = str_a.replace("h","x")

# 删除
result = str_a.split("e")
" ".join(result)

str_a.split("h")


############################
# 格式化输出
result = f"{str_a}, {str_b}!"
result2 = "{0}{1}".format(str_a,str_b)
result3 = "{}{}".format(str_a,str_b)
result4 = "{a}{b}".format(a="hello",b="world")


################################
with open("第二周_第二节tmp.py", "w") as f:
    content = f.read()
    with open("第二周_第二节.py", "r") as fd:
        fd.write(content)
